package com.atlin.project.service;

import com.atlin.project.model.domain.cds.FileMetadata;
import com.atlin.project.model.dto.fileMetadata.FileMetadataQueryRequest;
import com.atlin.project.model.vo.cds.FileMetadataVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * @author atlin
 * @description fileMetadata
 * @createDate date
 */
public interface FileMetadataService extends IService<FileMetadata> {

    void valid(FileMetadata fileMetadata, boolean add);

    /**
     * 获取封装
     *
     * @param fileMetadata
     * @param request
     * @return
     */
    FileMetadataVO getFileMetadataVO(FileMetadata fileMetadata, HttpServletRequest request);


    /**
     * 获取查询条件
     *
     * @param questionQueryRequest
     * @return
     */
    QueryWrapper<FileMetadata> getQueryWrapper(FileMetadataQueryRequest questionQueryRequest);

    /**
     * 分页获取封装
     *
     * @param questionPage
     * @param request
     * @return
     */
    Page<FileMetadataVO> getFileMetadataVOPage(Page<FileMetadata> questionPage, HttpServletRequest request);
}
